package com.sl.mes.db.service.bd;

import com.sl.mes.db.dao.BdDefdocMapper;
import com.sl.mes.db.itf.bd.IBdDefdoc;
import com.sl.mes.db.itf.bd.IBdDefdoclist;
import com.sl.mes.db.vo.BdDefdoc;
import com.sl.mes.db.vo.BdDefdocExample;
import com.sl.mes.db.vo.BdDefdoclist;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BdDefdocService implements IBdDefdoc {
    @Resource
    private BdDefdocMapper bdDefdocMapper;


    @Override
    public List<BdDefdoc> queryBypkDefdoclist(String pk_defdoclist) {
        BdDefdocExample bdDefdocExample=new BdDefdocExample();
        bdDefdocExample.or().andPkDefdoclistEqualTo(pk_defdoclist).andDrEqualTo(0);
        List<BdDefdoc> lstBdDefdoclist=bdDefdocMapper.selectByExample(bdDefdocExample);
        return lstBdDefdoclist;
    }

    @Override
    public BdDefdoc findById(String pk_defdoc) {
        return bdDefdocMapper.selectByPrimaryKey(pk_defdoc);
    }

    /**
     * 热场尺寸下拉选项
     * @return
     */
    @Override
    public List<BdDefdoc> selectDrop() {
        return bdDefdocMapper.selectDrop();
    }
}
